home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / Xt / XtConvertAndStore.z / XtConvertAndStore
Encoding:
Text File  |  1998-10-30  |  6.5 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXttttCCCCoooonnnnvvvveeeerrrrttttAAAAnnnnddddSSSSttttoooorrrreeee((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXttttCCCCoooonnnnvvvveeeerrrrttttAAAAnnnnddddSSSSttttoooorrrreeee((((3333XXXXtttt))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XtConvertAndStore, XtCallConverter - invoke resource
  10.           converters
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           Boolean XtConvertAndStore(_w_i_d_g_e_t, _f_r_o_m__t_y_p_e, _f_r_o_m, _t_o__t_y_p_e,
  14.           _t_o__i_n__o_u_t)
  15.               Widget _w_i_d_g_e_t;
  16.               String _f_r_o_m__t_y_p_e;
  17.               XrmValuePtr _f_r_o_m;
  18.               String _t_o__t_y_p_e;
  19.               XrmValuePtr _t_o__i_n__o_u_t;
  20.  
  21.           void XtCallConverter(_d_p_y, _c_o_n_v_e_r_t_e_r, _a_r_g_s, _n_u_m__a_r_g_s, _f_r_o_m,
  22.           _t_o__i_n__o_u_t, _c_a_c_h_e__r_e_f__r_e_t_u_r_n)
  23.               Display* _d_p_y;
  24.               XtConverter _c_o_n_v_e_r_t_e_r;
  25.               XrmValuePtr _a_r_g_s;
  26.               Cardinal _n_u_m__a_r_g_s;
  27.               XrmValuePtr _f_r_o_m;
  28.               XrmValuePtr _t_o__i_n__o_u_t;
  29.               XtCacheRef* _c_a_c_h_e__r_e_f__r_e_t_u_r_n;
  30.  
  31.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  32.           _a_r_g_s      Specifies the argument list that contains the
  33.                     additional arguments needed to perform the
  34.                     conversion, or NULL.
  35.  
  36.           _c_o_n_v_e_r_t_e_r Specifies the conversion procedure that is to be
  37.                     called.
  38.  
  39.           _f_r_o_m      Specifies the value to be converted.
  40.  
  41.           _f_r_o_m__t_y_p_e Specifies the source type.
  42.  
  43.           _n_u_m__a_r_g_s  Specifies the number of additional arguments
  44.                     (often zero).
  45.  
  46.           _t_o__t_y_p_e   Specifies the destination type.
  47.  
  48.           _t_o__i_n__o_u_t Returns the converted value.
  49.  
  50.           _w_i_d_g_e_t    Specifies the widget to use for additional
  51.                     arguments, if any are needed, and the destroy
  52.                     callback list.
  53.  
  54.           _d_p_y       Specifies the display with which the conversion is
  55.                     to be associated.
  56.  
  57.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  58.           The _X_t_C_o_n_v_e_r_t_A_n_d_S_t_o_r_e function looks up the type converter
  59.           registered to convert from_type to to_type, computes any
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXttttCCCCoooonnnnvvvveeeerrrrttttAAAAnnnnddddSSSSttttoooorrrreeee((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXttttCCCCoooonnnnvvvveeeerrrrttttAAAAnnnnddddSSSSttttoooorrrreeee((((3333XXXXtttt))))
  71.  
  72.  
  73.  
  74.           additional arguments needed, and then calls _X_t_C_a_l_l_C_o_n_v_e_r_t_e_r.
  75.           (or _X_t_D_i_r_e_c_t_C_o_n_v_e_r_t if an old-style converter was registered
  76.           with _X_t_A_d_d_C_o_n_v_e_r_t_e_r or _X_t_A_p_p_A_d_d_C_o_n_v_e_r_t_e_r.  ) with the from
  77.           and to_in_out arguments.
  78.  
  79.           The _X_t_C_a_l_l_C_o_n_v_e_r_t_e_r function looks up the specified type
  80.           converter in the application context associated with the
  81.           display and, if the converter was not registered or was
  82.           registered with cache type _X_t_C_a_c_h_e_A_l_l or _X_t_C_a_c_h_e_B_y_D_i_s_p_l_a_y
  83.           looks in the conversion cache to see if this conversion
  84.           procedure has been called with the specified conversion
  85.           arguments. If so, it checks the success status of the prior
  86.           call, and if the conversion failed, _X_t_C_a_l_l_C_o_n_v_e_r_t_e_r returns
  87.           _F_a_l_s_e immediately; otherwise it checks the size specified in
  88.           the _t_o argument and, if it is greater than or equal to the
  89.           size stored in the cache, copies the information stored in
  90.           the cache into the location specified by _t_o->_a_d_d_r, stores
  91.           the cache size into _t_o->_s_i_z_e, and returns _T_r_u_e.  If the size
  92.           specified in the _t_o argument is smaller than the size stored
  93.           in the cache, _X_t_C_a_l_l_C_o_n_v_e_r_t_e_r copies the cache size into the
  94.           _t_o->_s_i_z_e and returns _F_a_l_s_e.  If the converter was registered
  95.           with cache type _X_t_C_a_c_h_e_N_o_n_e or no value was found in the
  96.           conversion cache, _X_t_C_a_l_l_C_o_n_v_e_r_t_e_r calls the converter and,
  97.           if it was not registered with cache type _X_t_C_a_c_h_e_N_o_n_e, enters
  98.           the result into the cache.  _X_t_C_a_l_l_C_o_n_v_e_r_t_e_r then returns
  99.           what the converter returned.
  100.  
  101.           The _c_a_c_h_e__r_e_f__r_e_t_u_r_n field specifies storage allocated by
  102.           the caller in which an opaque value will be stored. If the
  103.           type converter has been registered with the _X_t_C_a_c_h_e_R_e_f_C_o_u_n_t
  104.           modifier and if the value returned in in _c_a_c_h_e__r_e_f__r_e_t_u_r_n is
  105.           non-NULL, then the call should store the _c_a_c_h_e__r_e_f__r_e_t_u_r_n
  106.           value in order to decrement the reference count when the
  107.           converted value is no longer required. The _c_a_c_h_e__r_e_f__r_e_t_u_r_n
  108.           argument should be ULL if the caller is unwilling or unable
  109.           to store the value.
  110.  
  111.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  112.           XtAppReleaseCacheRefs(3Xt)
  113.           _X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s - _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
  114.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.